OLE.CreatePicture Function

Syntax

P CreatePicture(C LoadedImageName)

Arguments

LoadedImageName

The name of a bitmap object created with UI_BITMAP_LOAD().

Description

The OLE.CreatePicture() function creates a IPictureDisp object.

Discussion

Create an OLE picture object from an image previously loaded by calling ui_bitmap_load().

Example

This is part of the code used to create and load an image to display behind a pie chart in a SimpleChart ActiveX control.

dim b as B
' Load a bitmap into a blob variable
b = file.to_blob("somebitmapfile.bmp")
' Load the binary data into the Alpha Anywhere bitmap cache
ui_bitmap_load("image_name", b)
' Create the IPictureDisp object you need
x = OLE.createPicture("image_name")
.BackImage = x

See Also